import java.util.*;
public class Main{
    public static void main(String args[]){
        int m,n,gc,lc;
        Scanner sc = new Scanner(System.in);
        System.out.println("输入m：");
        m=sc.nextInt();
        System.out.println("输入n：");
        n=sc.nextInt();
        Gcd gcd =new Gcd();
        Lcm lcm =new Lcm();
        gc=gcd.g(m,n);
        lc=lcm.l(m,n);
        System.out.println("最大公因数："+gc);
        System.out.println("最小公倍数："+lc);
    }
}
